import request from "@/utils/request";

// 查询资料上传列表
export function listMaterial(query) {
  return request({
    url: "/learning/material/list",
    method: "get",
    params: query,
  });
}

// 查询资料上传详细
export function getLearning(materialId) {
  return request({
    url: "/learning/material/" + materialId,
    method: "get",
  });
}

// 新增资料上传
export function addLearning(data) {
  return request({
    url: "/learning/material",
    method: "post",
    data: data,
  });
}

// 修改资料上传
export function updateLearning(data) {
  return request({
    url: "/learning/material",
    method: "put",
    data: data,
  });
}

// 删除资料上传
export function delLearning(materialId) {
  return request({
    url: "/learning/material/" + materialId,
    method: "delete",
  });
}
